package com.geotmt.billingcenter.config.datasources;

/**
 * @Description 数据源标记类
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/19 14:08
 * @Version     v1
 **/
public class DataSourceContextHolder {

    public static final String MYSQL = "mysql";

    public static final String HIVE = "hive";

    private static final ThreadLocal<String> local = new ThreadLocal<>();

    public static ThreadLocal<String> getLocal() {
        return local;
    }

    public static void set(String lookupKey) {
        local.set(lookupKey);
    }

    public static String get() {
        return local.get();
    }

    public static void remove() {
        local.remove();
    }
}
